package org.example.springboot.controller;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.example.springboot.common.page.PageResult;
import org.example.springboot.common.utils.Result;
import org.example.springboot.entity.FmcBeacon;
import org.example.springboot.query.FmcBeaconQuery;
import org.example.springboot.query.FmcControlQuery;
import org.example.springboot.service.FmcBeaconService;
import org.example.springboot.service.FmcControlService;
import org.example.springboot.vo.FmcBeaconVO;
import org.example.springboot.vo.FmcControlVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Slf4j
@RestController
@RequestMapping("/beacon")
@AllArgsConstructor
public class FmcBeaconController {
    @Resource
    private final FmcBeaconService fmcBeaconService;

    @PostMapping("page")
    public Result<PageResult<FmcBeacon>> page(@RequestBody FmcBeaconQuery query) {
        PageResult<FmcBeacon> page = fmcBeaconService.page(query);
        return Result.ok(page);
    }

}